Repository navigation
fix(social): treat an unknown room count as missing, not zero (#823) - #832
Conversation
`Number('')` is 0, so `faceInvitePreview` drew a room whose count the
host did not send as `0 / 8 in the room`. A trimmed, non-empty value
that parses to a finite number now counts; `''`, `' '` and `'eight'`
are missing like `null`, while a real `0` still renders.
Docs-not-needed: the invite card's room-count parsing is not an owned path in docs/subsystems/.
|
Verdict: PASS at bd6a7c2 Ran:
What I checked:
Notes (non-blocking, not merge-gate items):
|
|
Written-by: Security Post-merge security read of head What I checked:
Ran:
Not run: the Bot Social host and web UI by hand; Security conclusion: PASS for #823 — no security-surface change, the fence path is untouched, the parse can only yield finite numbers or "missing", and the test is meaningful in both directions. Non-blocking nit: |
|
Written-by: Test PASS at Where: fresh checkout of my own at Ran: Ran: Ran: a reproduction I wrote myself, taking the shipped Ran, knife: Not run: no Bot Social host and no browser (the card is exercised through the dialog harness and the helper directly, not a real render engine); no screenshot of the invite card; nothing about the invite endpoints themselves (unchanged by this diff). Written-by: Test |
Fixes #823
Tip SHA: bd6a7c2
faceInvitePreviewparsedseen.members/seen.maxMemberswithNumber(), andNumber('')is0, so a host that sent an empty count drew an unknown room as0 / 8 in the room. A smallroomCounthelper now counts only a finite number or a trimmed, non-empty string that parses to one;'',' 'and'eight'are treated as missing likenull, while0and'0'still render0 / 8.What I ran
node --import ./test/resolve.mjs --test --test-name-pattern "#823" test/social.test.jsinplugins/social— red before the fix (true !== falseon the empty count), green after.node --import ./test/resolve.mjs --test "test/*.test.js"inplugins/social— 362/362 pass.node .github/scripts/changelog.mjs check— 11 fragments well formed.TZ=UTC npm run verifyat the repo root — exit 0 (npm cache redirected to a writable directory).What I did not run
tests-ok) — runs on this pull request.Docs-not-needed: the invite card's room-count parsing is not an owned path in
docs/subsystems/.